﻿using Autodesk.AutoCAD.DatabaseServices;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dmo_lc_2.Utils
{
    class getLayerData
    {
        public static int[] getLayerColor(Transaction tr, ObjectId layerId)
        {
            LayerTableRecord layer = (LayerTableRecord)tr.GetObject(layerId, OpenMode.ForRead);

            if (layer != null)
                return new int[] { layer.Color.ColorValue.R, layer.Color.ColorValue.G, layer.Color.ColorValue.B };

            return null;
        }
    }
}
